package com.zzxy.spring.dao.impl;

import com.zzxy.spring.dao.IUserDao;
import com.zzxy.spring.entity.User;
import org.mybatis.spring.support.SqlSessionDaoSupport;
import org.springframework.stereotype.Repository;

/**
 * @author aven
 * @description: TODO
 */
@Repository
public class UserDaoImpl extends SqlSessionDaoSupport implements IUserDao {
    @Override
    public void insert(User user) {
        System.out.println("insert user in dao ..");
    }

    @Override
    public User selectUserById(int id) {
        User user = this.getSqlSession().selectOne("findUserById", id);
        return user;
    }
}
